package com.zudada.servermain.POJO.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.JsonNode;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@TableName("vessel_berthing")
@Data
public class VesselBerthing {
    @TableId
    private String berthId;

    private String portId;
    private String vesselId;
    private String vesselName;
    private String vesselType;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date berthTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date departureTime;
    @TableField(typeHandler = com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler.class)
    private JsonNode cargoInfo;
    private String operator;
    private String status;


    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") // Jackson 反序列化格式（时区重要，避免时差）
    private Date etaTime;

    private String portCongestion;
    private String berthPosition;
    private Integer estimatedVesselCount;
}
